<?php namespace Common\Model;
use Hdphp\Model\Model;
//货品列表模型控制器
 class Goodslist extends Model{
 	//指定货品列表
 	protected $table="goods_list";
	//自动验证
	protected $vaildate=array(
		array('combine','required','组合属性Id不能为空',3,3),
		array('number','required','货品号不能为空',3,3),
	);
	//编辑模型
	public function edit(){
	    if(!$this->create()) return false;
		$goodslist=Q('post.combine');
//		p($goodslist);die;
		//把数组变为字符串
		$data=implode('|', $goodslist);
		$this->data['combine']=$data;
		$this->save();
		return true;
	}

 }





 ?>